home *** CD-ROM | disk | FTP | other *** search
/ Ham Radio 2000 / Ham Radio 2000.iso / ham2000 / satellit / pfh0210 / pfh.doc < prev    next >
Text File  |  1991-02-09  |  9KB  |  203 lines

  1.                                       PFH
  2.                                       
  3.                              by Rob Janssen, PE1CHL
  4.  
  5.  
  6.     PFH is a simple program to interpret the "Pacsat File Header" that is 
  7.     on front of each file received from the PACSATs.  It can also add a 
  8.     Pacsat File Header to your existing file, so that it can be uploaded to 
  9.     a PACSAT. 
  10.  
  11.     The program has been written in C, with portability in mind.  It runs 
  12.     on both little-endian (8086) and big-endian (68000) machines. 
  13.  
  14.     For all display and directory modes the program operates entirely 
  15.     command-line driven, allowing the use in batchfiles.  When the "-a" 
  16.     option (add Pacsat File Header) is used, the program prompts for values 
  17.     to be used in the header. 
  18.  
  19.     Starting PFH with no parameters, or with illegal parameters, yields the 
  20.     following message: 
  21.  
  22.     Usage: pfh [-s] [-h] [-7] <inputfile> [<outputfile>]
  23.            interprets Pacsat File Header on file
  24.            when <outputfile> specified, body is copied to it
  25.            -s option suppresses certain header items
  26.            -h option prints only the header, not the body
  27.            -7 option strips high bit when copying the body
  28.  
  29.     or:    pfh -t <inputfile>...
  30.            prints PFH items in <inputfile>s in short format
  31.  
  32.     or:    pfh -d <dirfile>
  33.            prints PFH items in <dirfile> in short format
  34.  
  35.     or:    pfh -c <dirfile>
  36.            cleans <dirfile> (removes duplicate entries & sorts)
  37.  
  38.     or:    pfh -a <inputfile> <outputfile>
  39.            adds PFH to file (prompts for header values)
  40.  
  41.     This indicates the 5 modes of operation of the program.
  42.  
  43.     MODE 1
  44.  
  45.     In this mode a downloaded file (downloaded using FTL0 or received using 
  46.     the broadcast protocol) can be shown. 
  47.     
  48.     Use "PFH filename" to printout the header and the contents of the 
  49.     downloaded file. Use "PFH inputfile outputfile" to print the header and 
  50.     create "outputfile" that will contain the body of the file. (this is 
  51.     useful when receiving .exe files) 
  52.  
  53.     The following options are recognized in this mode:
  54.  
  55.     -s      suppress certain boring items in the pacsat file header.
  56.             can be used when the output is sent as a BBS message.
  57.     -h      only prints the header, not the body.  this is useful when one 
  58.             only wants to look at the header fields and/or wants to check 
  59.             the checksums. 
  60. 2
  61.     -7      high bit of all bytes in the body is cleared.  use this to make 
  62.             Wordstar files readable when you don't have that program. don't 
  63.             use it when the file is binary! 
  64.  
  65.     MODE 2
  66.  
  67.     In this mode a table of contents of a series of downloaded files can be 
  68.     printed. For each file, one line of output will be generated, like: 
  69.  
  70.      File_ID Ty Length To          From      Date/Time Title
  71.     00000AD6 00    370 JA6FTL      SM5BVF    0125/1932 My stn
  72.     00000AD7 0C 157056 all         pe1chl    0126/0925 NET.PE1CHL 910123 
  73.     00000AD8 00    553 wd3q        g0k8ka    0125/2114 Not WFQ you.
  74.     00000AD9 05  32588                       0126/2042 cp910126
  75.     00000ADA 0C  28808                       0126/2011 AL910126
  76.     00000ADB 00    598 ALL         VK3DTO    0126/0117 U2MIR ACTIVITY
  77.  
  78.     This way you can find a message in a directory containing lots of 
  79.     downloaded files. 
  80.  
  81.     This mode relies on the wildcard-expanding in your commandline 
  82.     interpreter and/or C runtime.  When everything is correctly setup, you 
  83.     should be able to use "PFH -t *.*" to get a table of contents of all 
  84.     files in the current directory. 
  85.  
  86.     MODE 3
  87.  
  88.     In this mode a list similar to the one shown above is printed, but the 
  89.     input is a single file that was downloaded from the satellite using the 
  90.     DIR command.  
  91.     
  92.     In addition to the list of files, the highest date/time (commonly known 
  93.     as "hightime" is printed in both seconds-since-1970 and in user-
  94.     readable format: 
  95.  
  96.     Hightime: 27A1E9B7 = 910126204231 (Sat Jan 26 20:42:31 1991)
  97.  
  98.     This can be used in future directory requests, or to set the hightime 
  99.     for PG. 
  100.  
  101.     Use "PFH -d dirfile.dl" to print the list for file "dirfile.dl".  The 
  102.     output can be redirected to a file as usual. 
  103.  
  104.     MODE 4
  105.  
  106.     In this mode, nothing is printed.  The specified directory file (like 
  107.     in Mode 3) is sorted and duplicate entries are removed.  Entries 
  108.     occurring later in the file replace earlier entries. 
  109.     
  110.     This can be used after multiple overlapping selections have been made, 
  111.     and the resulting downloaded file contains the same directory entry 
  112.     more than once.  The file will be sorted in upload_time order, so that 
  113.     when you use mode 3 of this program (pfh -d) the files are printed in 
  114.     sequence of completion. 
  115.  
  116.     MODE 5
  117.  
  118.     In this mode you can create your own files for uploading.  You'll need 
  119.     to prepare your file using a separate text editor and/or compression 
  120. 3
  121.     program, as PFH will only attach the header to an existing file. 
  122.     
  123.     Start PFH using: "PFH -a yourfile outputfile" to start creating a file 
  124.     named "outputfile", that will contain a Pacsat File Header followed by 
  125.     the data from the file "yourfile".  This will overwrite any existing 
  126.     file named "outputfile", but will not alter "yourfile". 
  127.  
  128.     PFH will prompt you for several items to be inserted in the Pacsat File 
  129.     Header: 
  130.  
  131.     File-type: enter a decimal number representing the file's type.  File-
  132.     types are assigned numbers, for which the following values are known 
  133.     now: 
  134.  
  135.      0      ASCII text intended for display/printing (not compressed)
  136.      1      RLI/MBL message
  137.      2      RLI/MBL importfile (multiple message)
  138.      3      UoSAT whole orbit data (don't upload)
  139.      4      Microsat whole orbit data (don't upload)
  140.      5      UoSAT CPE data (don't upload)
  141.      6      MSDOS .EXE file
  142.      7      MSDOS .COM file
  143.      8      Keplerian elements NASA 2-line format
  144.      9      Keplerian elements AMSAT format
  145.     10      ASCII text file (compressed)
  146.     11      ELTLOG (don't upload)
  147.     12      Miscellaneous binary files
  148.  
  149.     Other values will be added to this list, so check news bulletins.
  150.     When your file has another type, enter the value "255".  You will be 
  151.     asked for a description of the file lateron. 
  152.  
  153.     Source: enter the source of the file (e.g. your callsign)
  154.  
  155.     Destination: enter the destination of the file (e.g. a callsign or ALL)
  156.  
  157.     Priority: enter the relative priority of the file.  value 0 is 
  158.     recommended. Simply press <enter> to get this value as a default. 
  159.  
  160.     Compression-type: enter the way the file was compressed, as follows:
  161.  
  162.      0      no compression (this is the default)
  163.      1      PKARC-type compression.  You may also enter "arc" for this type.
  164.      2      PKZIP-type compression.  You may also enter "zip" for this type.
  165.  
  166.     Further types can be added to the list of compression types.  When you 
  167.     enter the value 255 here, you will be prompted for a text description 
  168.     of your compression type. 
  169.  
  170.     BBS-Message-type: when the message is to be sent via a BBS, use this 
  171.     character as a message type.  For a bulletin this would be B.  When the 
  172.     file is not for use as a BBS message, just press <enter> to get no 
  173.     message type. 
  174.  
  175.     Bulletin-ID: enter the bulletin ID to be used when the file is sent as 
  176.     a BBS message.  This should be present in all messages addressed to 
  177.     ALL, so that anyone forwarding the message into the terrestrial BBS 
  178.     network can use this value as the bulletin ID.  When you just press 
  179.     <enter> here the output file will get no bulletin ID, as appropriate 
  180. 4
  181.     for private communication. 
  182.  
  183.     Title: enter a short description of the file content.  This will appear 
  184.     in listings like those generated by mode 2 and 3 of the program, so 
  185.     limit it to 30-40 characters in length. 
  186.  
  187.     Keywords: enter keywords describing the file.  These can be used to 
  188.     select files for downloading by certain groundstation programs.  Just 
  189.     press <enter> when you don't want to add keywords. 
  190.  
  191.     Further prompts may appear, depending on your selections for File-type 
  192.     and Compression-type. 
  193.  
  194.     When all prompts have been answered, the outputfile is created and the 
  195.     PFH program exits to the operating system.  You can use mode 1 to look 
  196.     at the resulting outputfile. 
  197.  
  198.  
  199.     PFH is copyright 1991 by Rob Janssen, PE1CHL
  200.     
  201.     It may be used for non-commercial purposes only, provided that the name 
  202.     of the author is retained in source, object and documentation. 
  203.